<!DOCTYPE html>
<html>
<head>
    <title></title>

</head>
<body>
<button id="btn1">CLICK ME</button>
<script language="JavaScript">
    var btn1=document.getElementById('btn1');
    btn1.onclick=function(e){
        console.dir(e || window.event);
    };

</script>
</body>
</html>